home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / util / boot / ShellUpdate.lha / Documentation / Path < prev    next >
Text File  |  2001-12-24  |  4KB  |  96 lines

  1. Path
  2.  
  3. Format:        PATH [{<dir>}] [ADD] [SHOW] [RESET] [QUIET] [REMOVE] [HEAD]
  4. Template:    PATH/M,ADD/S,SHOW/S,RESET/S,REMOVE/S,HEAD/S,QUIET/S
  5. Purpose:    To control the directory list that the shell searches to find
  6.         commands.
  7. Path:        Internal
  8. Specification:    PATH lets you see, add to, or change the search path that
  9.     AmigaDOS follows when looking for a command or program to execute.
  10.     When a directory is in the search path, you no longer need to specify
  11.     the complete path to any files or subdirectories within that 
  12.     directory. You can just enter the filename, and AmigaDOS will look 
  13.     through the directories in the search path until it finds the file.
  14.  
  15. Enter the PATH command alone, or with the SHOW option, and the directory names
  16. in the current search path will be displayed. Normally, when PATH is
  17. displaying the directory names, a requester appears if a volume that is part
  18. of the search path cannot be found. For instance, if you added a floppy disk
  19. to the search path, then removed that disk from the disk drive, a requester
  20. would ask you to insert the disk.
  21.  
  22. If you specify the QUIET option, PATH will not display requesters for volumes
  23. that are not currently mounted. If PATH encounters an unmounted volume, it
  24. simply displays the apropriate error code, but continues with the listing.
  25.  
  26. The ADD option specifies directory names to be added to the current PATH.
  27. You can add as many directories a time as you wish; the ADD keyword is
  28. optional. Names of the directories must be separated by at least one space.
  29. When you issue the PATH command, AmigaDOS searches for each of the ADDed
  30. directories.
  31.  
  32. Directories within the PATH are searched in the order they appeared on
  33. the command line, with new PATH components added to the tail of the PATH
  34. list. That is, commands in a former PATH directory override those in a latter
  35. directory because they are found first when the Shell searches for commands.
  36.  
  37. If you specify the HEAD keyword, however, new directories are added the HEAD
  38. of the PATH, to be searched first for commands.
  39.  
  40. To replace the existing search path with a completely new one, use PATH RESET
  41. followed by the names of the directories. The exisitng search path, except for
  42. the current directory and C:, is then erased and the new one is substituted.
  43.  
  44. The REMOVE option eliminates the named directory from the search path.
  45.  
  46. Examples:
  47.  
  48. 1> PATH EXTRAS2.0:Tools ADD
  49.  
  50. adds the Tools directory on the Extras2.0 disk to the search path of the
  51. Shell. If the Extras2.0 disk is not in a disk drive, a requester will ask
  52. you to insert it in any drive.
  53.  
  54. If you remove Extras2.0 from the drive, and type
  55.  
  56. 1> PATH
  57.  
  58. a list of directories in the search path will be displayed. A requester will
  59. ask you to insert Extras2.0. However, if you had typed:
  60.  
  61. 1> PATH QUIET
  62.  
  63. THe list of directores in the search path will be displayed; however, when the
  64. path comes to Extras2.0:Tools, only an error message 
  65.  
  66. device (or volume) is not mounted
  67.  
  68. will appear in the list.
  69.  
  70.  
  71. If you use two different versions of the "cmp" program, one residing in 
  72. SYS:Tools and another in SYS:Compiler/bin, and you add only the former
  73. directory to the path in the User-Startup by
  74.  
  75. PATH SYS:Tools ADD
  76.  
  77. only "SYS:Tools/Cmp" will be used whenever you run the "cmp" program
  78. from the shell. Even if you enlarge the path manually by
  79.  
  80. 1> PATH SYS:Compiler/bin ADD
  81.  
  82. the "SYS:Tools/Cmp" program gets used because the new directory is added
  83. to the tail of the directory list making up the PATH, and "SYS:Tools/Cmp"
  84. is found before "SYS:Compiler/bin" is searched for another "cmp" program.
  85.  
  86. However, would you have specified
  87.  
  88. 1> PATH SYS:Compiler/bin ADD HEAD
  89.  
  90. the directory "SYS:Compiler/bin" would have been added in front of 
  91. "SYS:Tools", and hence the Shell would have looked there first. Therefore,
  92. "Cmp" would then refer to "SYS:Compiler/Cmp" rather than "SYS:Tools/Cmp"
  93. because it is found first.
  94.  
  95.  
  96. See also: ASSIGN